
class MyArray<T> {
    //public Object[] array = new Object[10];
    public T[] array = (T[]) new Object[10];

    public T getPos(int pos) {
        return array[pos];
    }

    public void setPos(int pos, T value) {
        array[pos] = value;
    }
}

public class TestDemo {
    public static void main(String[] args) {
        MyArray<Integer> myArray = new MyArray<Integer>();
        myArray.setPos(0, 1);
        myArray.setPos(1, 2);

        Integer ret = myArray.getPos(1);
        System.out.println(ret);

    }
}
